From 1108059537090395a9f26a41d7a65712cb82f4f3 Mon Sep 17 00:00:00 2001 From: Jochen Sprickerhof Date: Fri, 7 Aug 2020 15:37:44 +0200 Subject: [PATCH] Add patch for i386 test failure --- debian/patches/620.patch | 43 ++++++++++++++++++++++++++++++++++++++++ debian/patches/series | 1 + debian/rules | 8 -------- 3 files changed, 44 insertions(+), 8 deletions(-) create mode 100644 debian/patches/620.patch diff --git a/debian/patches/620.patch b/debian/patches/620.patch new file mode 100644 index 000000000..6af208cc5 --- /dev/null +++ b/debian/patches/620.patch @@ -0,0 +1,43 @@ +From fc5377212cfb4fe548bc918cfa2896256917125e Mon Sep 17 00:00:00 2001 +From: tsteven4 <13596209+tsteven4@users.noreply.github.com> +Date: Fri, 7 Aug 2020 06:58:05 -0600 +Subject: [PATCH] fix i386 regression error with engima. + +this was motivated by the test failure seen at +https://buildd.debian.org/status/fetch.php?pkg=gpsbabel&arch=i386&ver=1.7.0%2Bds-4&stamp=1596794554&raw=0 +--- + enigma.cc | 13 ++++++++++--- + 1 file changed, 10 insertions(+), 3 deletions(-) + +diff --git a/enigma.cc b/enigma.cc +index 850f27b4e..32fea92d6 100644 +--- a/enigma.cc ++++ b/enigma.cc +@@ -21,9 +21,16 @@ + + */ + ++#include // for fabs, lround ++#include // for int32_t, uint8_t, uint32_t ++#include // for abs ++#include // for strlen, memcpy, memset ++ ++#include // for QString ++ + #include "defs.h" +-#include +-#include ++#include "gbfile.h" // for gbfclose, gbfopen_le, gbfread, gbfwrite, gbfile ++ + + #define MYNAME "Enigma binary route and waypoint file format" + +@@ -177,7 +184,7 @@ enigma_waypt_disp(const Waypoint* wpt) + le_write32(&ewpt.longitude, decToEnigmaPosition(wpt->longitude)); + ewpt.waypoint_type = WTYPE_WAYPOINT; + if (wpt->altitude != unknown_alt) { +- le_write32(&ewpt.data.wp_altitude, METERS_TO_FEET(wpt->altitude) + 1000); ++ le_write32(&ewpt.data.wp_altitude, lround(METERS_TO_FEET(wpt->altitude)) + 1000); + } + if (wpt->shortname != nullptr) { + ewpt.shortname_len = (uint8_t) min(6, strlen(CSTRc(wpt->shortname))); diff --git a/debian/patches/series b/debian/patches/series index 3457dce87..2af2336c1 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -8,3 +8,4 @@ cross.patch gmapbase.html-location 0009-Drop-mac-libusb-libusb.h-dependency.patch 618.patch +620.patch diff --git a/debian/rules b/debian/rules index 64a8c87cb..3db965a9f 100755 --- a/debian/rules +++ b/debian/rules @@ -28,11 +28,3 @@ override_dh_auto_build-arch: override_dh_auto_build-indep: $(MAKE) doc $(MAKE) gpsbabel.html - -# Ignore broken unit tests on some architectures -override_dh_auto_test: -ifneq (,$(filter $(DEB_BUILD_ARCH),i386)) - dh_auto_test || true -else - dh_auto_test -endif -- 2.30.2